--[[
	MOB CRIADO POR LUIZINHO & LUNOVOX
]]--

lunomobs:register_mob("lunomobs:sasquatch", {
	type = "monster",
	mob_name="SASQUATCH",
	hp_max = 20, --Padrão = 4
	xp_give = 20,
	jump = true, 
	visual = "mesh",
	mesh="mobs_humanoid.b3d",
	textures = {"mobs_humanoid_sasquatch.png"},
	collisionbox = {-0.6,-2.0,-0.6, 0.6,1.6,0.6}, --collisionbox = {-0.3,-1.0,-0.3, 0.3,0.8,0.3},
	visual_size= {x=2, y=2},
	drawtype = "front",
	makes_footstep_sound = true,
	view_range = 20, --Padrao = 15
	walk_velocity = 1,
	run_velocity = 3,
	damage = 5,
	drops = { 
		{name="default:pine_sapling", chance = 20, min=1, max=1,}, --Probabilidade é de 1:20 (=5%) de cair entre 1 a 1 "minemoedas"
	},
	armor = 100,
	water_damage = 1, --1=Morte lenta
	lava_damage = 10,
	--light_damage = 0,
	shadow_damage = 3,
	attack_type = "dogfight",
	animation = {
		speed_normal=15, speed_run=30,
		stand_start=0, stand_end=79,
		walk_start=168, walk_end=187,
		run_start=168, run_end=187,
		punch_start=189, punch_end=199, --Ataca Parado.
		--punch_start=200, punch_end=219, --Ataca correndo. (incorreto! Pois o npc so ataca paradop quando chega perto.)
		--punch_start=81, punch_end=161, --sentado
	},
	sounds = {
		random = "mobs_sasquatch_random",
		attack = "mobs_punch",
		hit = "sword_2",
		die = "mobs_shout", --Não existe som de morte! (mas eu fiz acontecer ^.^)
	},
	--follow = "lunotrades:minecoin",
})

lunomobs:register_spawn("lunomobs:sasquatch", {
	"default:snow",	"default:dirt_with_snow", "default:snowblock", "default:ice"
	}, 20, 4, 7000, 4, 31000
)

minetest.register_craftitem("lunomobs:sasquatch", {
	description = "Sasquatch",
	groups = { mobs=1 },
	inventory_image = "mob_sasquatch.png",
	on_place = function(itemstack, placer, pointed_thing)
		if pointed_thing.above then
			local spawnpos = pointed_thing.above
			spawnpos = {x=spawnpos.x, y=spawnpos.y+2, z=spawnpos.z}
			minetest.env:add_entity(spawnpos, "lunomobs:sasquatch")
			if not minetest.setting_getbool("creative_mode") then itemstack:take_item() end
		end
		return itemstack
	end,
})

minetest.register_alias("pegrande"						, "lunomobs:sasquatch")
minetest.register_alias("sasquatch"						, "lunomobs:sasquatch")
minetest.register_alias("abominavelhomendasneves"	, "lunomobs:sasquatch")

